﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace zichan.Entity
{
    public class ServerPurposeClass
    {
        [Key]
        public int serverPurposeId { get; set; }
        [Required(ErrorMessage ="服务器用途不能为空")]
        public string serverPurposeName { get; set; }
        [Required(ErrorMessage = "序号不能为空")]
        [RegularExpression(@"^\+?[1-9]\d*$", ErrorMessage = "只能为正整数")]
        public int sort { get; set; }
        [NotMapped]
        public int UseCount { get; set; }
    }
}
